#ifndef WEBSOCKETSERVER_H
#define WEBSOCKETSERVER_H

#include <QTcpServer>

#include "websocket.h"


class WebSocketServer : public QTcpServer
{
    Q_OBJECT
public:
    WebSocketServer(QObject *parent = 0);

    bool hasPendingConnections() const;
    WebSocket *nextPendingConnection();

    void incomingConnection(qintptr descr);

public Q_SLOTS:
    void changeIntoPending();

Q_SIGNALS:
    void socketReady();

private:
    QList<WebSocket*> v_pendingSocket;
    QList<WebSocket*> v_notConnectedSocket;

private:
};

#endif // WEBSOCKETSERVER_H
